<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>移动位置2</title>
    <style>
        .box{
            width: 250px;
            height: 250px;
            border: 1px solid #ccc;
            text-align: center;
            line-height: 250px;
            background: #810080;
            color: yellow;
            cursor: pointer;
            position: absolute;
            left: 0;
            top: 0;
        }
    </style>
</head>
<body>
<div class="box">
    首页
</div>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function () {
        $(".box").click(function () {
            $(this).animate({"left" : "200px"},1000).animate({"top" : "200px"},1000);
        })
    })
</script>